home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 July
/
Macworld (1999-07).dmg
/
Shareware World
/
Info
/
For Developers
/
Mops 3.4.sea
/
Mops 3.4 release notes
next >
Wrap
Text File
|
1999-02-22
|
10KB
|
249 lines
================== Mops 3.4 RELEASE NOTES ===================
Here is the usual "release notes" describing the changes from the previous
Mops versions, so that those already using it don't have to wade through all
the documentation (or have to read right through the huge manual!!!).
The date of this release is February 1999. If you've received it more than
six months later, it might be an idea to check the Web site (see below) to
see if there's a later version.
First, here are my contact details:
------------------------------------------------------------------------
Mike Hore email: mikeh@zeta.org.au
Mops web page: http://www.netaxs.com/~jayfar/mops.html
snail-mail: _--_|\
Michael Hore / \
54 Frederick St, \_.--._*
Sydenham NSW 2044, v
AUSTRALIA.
------------------------------------------------------------------------
NEW FEATURES
============
The main new features in this release are register temp objects, and
initial support for the AltiVec vector processor that will be a part
of the forthcoming G4 Macs.
These two features are actually interrelated. A vector is a 128-bit
object which may consiste of 16 bytes, 8 2-byte integers, 4 4-byte
integers, or 4 32-bit floating point numbers. The AltiVec processor
has 32 vector registers, and a rich set of instructions that execute
on all elements of a vector simultaneously.
So in Mops we needed a way of telling the compiler to compile vector
instructions. One way would have been to implement a vector stack,
along the lines of the floating point stack, and let the compiler map
stack elements to vector registers as we do with floating point.
However there is another way that is simpler. We already have our
temp object mechanism, but these temp objects were always in memory.
This limited the usefulness of our Float class, since a Float object
was always in memory and thus would give worse performance than a
normal floating point number on the FP stack, or a floating local.
But since temp objects are very like local variables, it made sense to
allow a temp object to be instantiated in a register, if this makes
sense for a particular object. So this new feature is now available.
REGISTER TEMP OBJECTS
=====================
The new syntax is a straightforward extension of the temp object
syntax:
: myDefn { \ loc1 loc2 -- }
temp{ register int i1
register var v1
register float f1
}
...
;
The classes which may have register temp objects are those whose data
will fit in a register. These are: byte, ubyte, int, uint, var and
float. Also the new vector classes can be register temp objects.
If you specify "register" for any other object, it will be ignored.
You won't get an error message. The same thing will happen if there
aren't enough registers available, due to the number of locals or
previously specified register temp objects.
The other point to note is that if a temp object is instantiated in a
register, YOU CAN ONLY CALL INLINE METHODS ON THAT OBJECT. You will
get an error if you try to call any other method.
This makes sense if you think about it. Within a non-inline method,
the object's base address has to be available via the word ^BASE. But
an object in a register doesn't have a base address! Rather, the
compiler has to take special action while it's compiling a method
call, to take account of the fact that the object is in a register
rather than in memory as usual. And it has to do this separately for
each method invocation, since the referenced object won't always be in
the same register. The compiler can only do this if it has complete
control of the whole method invocation, which can only happen if the
method is inline.
ALTIVEC SUPPORT
===============
This is provided in the file Vectors.
Here, and in the appropriate section of the manual, we assume some
knowledge of the AltiVec processor and the instructions it provides.
There is plenty of information available via the Motorola AltiVec web
page:
http://www.mot.com.SPS/PowerPC/AltiVec/
If you have a G3 Mac, you can download an AltiVec emulator from
Apple's Altivec web page, which will let you at least test your code
before the G4 Macs arrive, possibly halfway through this year:
http://developer.apple.com/hardware/altivec/index.html
NOTE: the Mops AltiVec support is still very preliminary. I don't
have a G3 Mac, just occasional access to one at work, so I haven't
been able to do much testing. Also, not all the possible vector
operations are supported yet. I will attempt to fix these
shortcomings by the time actual G4 hardware becomes available. In the
meantime, if you have a chance to try some of the vector classes, let
me know of any problems you run into. THere will certainly be some!
We provide separate vector classes for all the different
vector types. This seems preferable to writing one vector class with
an ivar specifying what the vector type is, so that we can easily map
one of our vector classes on to successive sections of a longer vector
in memory. Thus the only ivar data in our vector classes is the
128-bit vector data itself.
The classes we provide are:
4-byte integers:
Word_vector uses modulo arithmetic
UWord_vector uses saturated arithmetic, unsigned
SWord_vector uses saturated arithmetic, signed
2-byte integers:
Int_vector uses modulo arithmetic
UInt_vector uses saturated arithmetic, unsigned
SInt_vector uses saturated arithmetic, signed
1-byte integers:
Byte_vector uses modulo arithmetic
UByte_vector uses saturated arithmetic, unsigned
SByte_vector uses saturated arithmetic, signed
4-byte floats:
Float_vector
We don't yet provide every vector operation defined for the AltiVec
processor -- this will hopefully happen by the time the actual
hardware is available. For now, we provide methods to do the basic
arithmetic and logical operations, as well as select, permute and
splat.
The PowerPC assembler and disassembler have been augmented with all
the AltiVec instructions. These are all given in a big test
definition in the file "vectors pasm test" in the "Module source"
folder, so you can use that as a reference for the syntax.
"EXTRAS" FOLDER
===============
A very minor change is that the "System source" folder had a number of
files in it which weren't part of the Mops system proper. So to keep
things more logical we now have a new "Extras" folder in the "Mops
source" folder for these and any other files that don't really fit
anywhere else. Here you'll find files such as the prolog file for
using the Forthe Subroutine Library, and the ANSI Forth prolog file.
BUGS FIXED
==========
There are a whole swag of minor bugs that have been fixed with this
release. Most (but not all) have been posted on comp.lang.forth.mac.
1. J and K now work properly in PowerMops.
2. ALERT" has now been revised to work in PowerMops.
3. There was an obscure bug in which the GrafPort could be set wrongly
when a new window was created in front of another window. When any
scroll bars in the back window were to be redrawn as empty recangles
(since the window was becoming deactivated), this bug was causing them
not to be redrawn. Thanks to Michael Baron for tracking this
one down!
4. SEND: in class Handle should have been locking the handle and
restoring its original state at the end. Also we were sending SEND: to
the stream instead of WRITE: - I hate to think what disasters this
could have caused!
5. Occasionally a quoted string might not have come out as expected
in PowerMops. The cause was very obscure - for the record, the
register containing the constant data pointer was not being saved and
restored over a leaf call when the leaf proc had a local. (You did
want to know, so I told you!!)
6. Clicks on scroll bars now work properly in PowerMops. This
relates to registers being set properly for callbacks. I posted a fix
on the newsgroup which works, but I've now done things a bit more
cleanly, which means we can now have :ppc_procs in modules, which
we couldn't before.
7. Tabs and comment lines in the Mops window now work as expected
when you hilight a block of text and hit Enter. Likewise these work
properly when you do it in Quick Edit.
8. Doug Hoffman's QEConsole has been fixed, and is now part of the
regular Mops distribution.
9. RECURSE didn't work properly in PowerMops when there were quoted
strings in the definition.
10. The length of filenames can now be up to 255 chars -- extra space
is porvided in the File class. Files specified by full pathname can
get quite long. Note that at present we make no attempt to resolve
aliases in the pathnames. I'm inclined to think that aliases and full
pathnames don't really mix -- sort of two different philosophies. I'm
still thinking about this one.
11. Versions of Mops released in the last year or so haven't been
able to load or run on Macs with the 68000 chip (Mac Plus, SE,
Classic). Up to now I haven't had a convenient way to check this
out, but I now have access to a Mac Plus with a hard disk, and
have fixed the two problems. There was an alignment bug causing
an odd address trap (this doesn't trap on 68020's or later), and
I was making the Mops window a color window, without testing if
the machine supported color!
--------------------------------------------------------------------
As always, I hope you enjoy Mops!
—- Mike Hore mikeh@zeta.org.au